﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity.ModelConfiguration;

using System.ComponentModel.DataAnnotations.Schema;

using SMG.Domain.Model.Migration;



namespace Infrastructure.Repository.EntityFramework.Migration
{
    public class PlayRecordConfiguration : EntityTypeConfiguration<PlayRecord>
    {

        public PlayRecordConfiguration()
        {
            ToTable("t_zb_playlist");
            HasKey<long>(b => b.ID);
            Property(b => b.ID).HasColumnName("id")
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity)
                .IsRequired();
            Property(p => p.PlayName).HasColumnName("name");
            Property(p => p.PlayContent).HasColumnName("context");
            Property(p => p.ChannelId).HasColumnName("ChannelId");
            Property(p => p.PlayDate).HasColumnName("PlayDate");
            Property(p => p.PlayVersion).HasColumnName("PlayVersion");
            Property(p => p.MoveStatus).HasColumnName("state");
            Property(p => p.TaskStatus).HasColumnName("make_task_state");
            Property(p => p.PlayType).HasColumnName("type");
            Property(p => p.CreateTime).HasColumnName("CreateTime");
            Property(p => p.UpdateTime).HasColumnName("UpdateTime");
        }

    }
}
